package com.pjedu.nbmallshop.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import java.util.Date;
import java.io.Serializable;

/**
 * (MallOrderItem)实体类
 *
 * @author 汪洋
 * @since 2022-01-31 15:03:56
 */
@Data
@Builder
public class MallOrderItem implements Serializable {
    private static final long serialVersionUID = 378745229968586192L;
    /**
     * 订单关联购物项主键id
     */
    private Long orderItemId;
    /**
     * 订单主键id
     */
    private Long orderId;
    /**
     * 关联商品id
     */
    private Long goodsId;
    /**
     * 下单时商品的名称(订单快照)
     */
    private String goodsName;
    /**
     * 下单时商品的主图(订单快照)
     */
    private String goodsCoverImg;
    /**
     * 下单时商品的价格(订单快照)
     */
    private Integer sellingPrice;
    /**
     * 数量(订单快照)
     */
    private Integer goodsCount;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Tolerate
    public MallOrderItem() {

    }
}

